<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');

/*
|--------------------------------------------------------------------------
| File and Directory Modes
|--------------------------------------------------------------------------
|
| These prefs are used when checking and setting modes when working
| with the file system.  The defaults are fine on servers with proper
| security, but you may wish (or even need) to change the values in
| certain environments (Apache running a separate process for each
| user, PHP under CGI with Apache suEXEC, etc.).  Octal values should
| always be used to set the mode correctly.
|
*/
$root = "http://".$_SERVER['HTTP_HOST'];
$root .= str_replace(basename($_SERVER['SCRIPT_NAME']),"",$_SERVER['SCRIPT_NAME']);

define('FILE_READ_MODE', 0644);
define('FILE_WRITE_MODE', 0666);
define('DIR_READ_MODE', 0755);
define('DIR_WRITE_MODE', 0777);


/*
|--------------------------------------------------------------------------
| File Stream Modes
|--------------------------------------------------------------------------
|
| These modes are used when working with fopen()/popen()
|
*/

define('FOPEN_READ',							'rb');
define('FOPEN_READ_WRITE',						'r+b');
define('FOPEN_WRITE_CREATE_DESTRUCTIVE',		'wb'); // truncates existing file data, use with care
define('FOPEN_READ_WRITE_CREATE_DESTRUCTIVE',	'w+b'); // truncates existing file data, use with care
define('FOPEN_WRITE_CREATE',					'ab');
define('FOPEN_READ_WRITE_CREATE',				'a+b');
define('FOPEN_WRITE_CREATE_STRICT',				'xb');
define('FOPEN_READ_WRITE_CREATE_STRICT',		'x+b');

define('PAGE_SIZE',10);
define('FILE_SIRE_UPLOAD',3072);

define('HOME_PAGE',$root);
define('FRONT_CSS',$root.'css/');
define('FRONT_JS',$root.'js/');
define('FRONT_IMG',$root.'images/');
define('FRONT_UPLOADED',$root.'uploaded/');
define('FRONT_FLASH',$root.'flash/');
define('FILES','files/');
define('FILES_PRODUCTS',FILES.'product/');
define('FILES_MEMBERS',FILES.'member/');
define('ADMIN_PAGE', 'admincp/');
define('ADMIN_VIEW', $root.'application/views/tp-admin');
define('ADMIN_CSS', ADMIN_VIEW.'/css/');
define('ADMIN_JS', ADMIN_VIEW.'/js/');
define('ADMIN_IMG', ADMIN_VIEW.'/images/');

define('ADMIN_PAGE_ACCESSORY_CATEGORY', ADMIN_PAGE.'admin_accessory_category/index');
define('ADMIN_PAGE_CATEGORY', ADMIN_PAGE.'admin_category/index');

define('ADMIN_PAGE_USER', ADMIN_PAGE.'admin_users/index');

define('ADMIN_PAGE_CATEGORY_ADD', ADMIN_PAGE.'adcategory/add');
define('ADMIN_PAGE_CATEGORY_EDIT', ADMIN_PAGE.'adcategory/edit');
define('ADMIN_PAGE_CATEGORY_DEL', ADMIN_PAGE.'adcategory/remove');

define('ADMIN_PAGE_PRODUCT', ADMIN_PAGE.'admin_product/index');
define('ADMIN_PAGE_ACCESSORY', ADMIN_PAGE.'admin_accessory/index');
define('ADMIN_PAGE_PRODUCT_EDIT', ADMIN_PAGE.'adproduct/edit');
define('ADMIN_PAGE_PRODUCT_DEL', ADMIN_PAGE.'adproduct/del');

define('tbl_category', 'tb_categories');
define('tbl_accessory','tb_accessories');
define('tbl_accessory_category','tb_accessory_category');
define('tbl_deals', 'tb_deals');
define('tbl_news', 'tb_news');
define('tbl_products', 'tb_products');
define('tbl_product_images','tb_product_images');
define('tbl_slides','tb_slides');
define('tbl_store','tb_store');
define('tbl_counter','tb_counter');
define('tbl_online','tb_online');
define('tbl_user', 'tb_users');
/* End of file constants.php */
/* Location: ./application/config/constants.php */